# Maintainer: Maksim Bondarenkov <maksapple2306@gmail.com>

_realname=nerd-fonts
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-otf-aurulent-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-codenewroman-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-comicshanns-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-droid-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-firamono-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-hasklig-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-hermit-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-opendyslexic-nerd"
         "${MINGW_PACKAGE_PREFIX}-otf-overpass-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-3270-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-agave-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-anonymouspro-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-arimo-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-bigblueterminal-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-bitstream-vera-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-cascadia-code-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-cousine-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-daddytime-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-dejavu-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-envy-code-r-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-fantasque-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-firacode-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-go-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-gohu-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-hack-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-heavydata-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-iawriter-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-ibmplex-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-inconsolata-go-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-inconsolata-lgc-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-inconsolata-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-iosevka-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-iosevkaterm-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-jetbrains-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-lekton-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-liberation-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-lilex-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-meslo-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-monofur-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-monoid-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-mononoki-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-mplus-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-noto-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-profont-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-proggyclean-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-roboto-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-sharetech-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-sourcecodepro-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-space-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-terminus-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-tinos-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-ubuntu-mono-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-ubuntu-nerd"
         "${MINGW_PACKAGE_PREFIX}-ttf-victor-mono-nerd")
pkgdesc="Iconic font aggregator, collection, and patcher (mingw-w64)"
pkgver=3.0.2
pkgrel=2
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
url='https://github.com/ryanoasis/nerd-fonts'
_urlbase="${url}/releases/download/v${pkgver}"
license=('spdx:MIT')
options=('!debug' '!strip')
provides=("${MINGW_PACKAGE_PREFIX}-ttf-font-nerd")
groups=("${MINGW_PACKAGE_PREFIX}-nerd-fonts")
source=("3270-${pkgver}.tar.xz::${_urlbase}/3270.tar.xz"
        "agave-${pkgver}.tar.xz::${_urlbase}/Agave.tar.xz"
        "anonymouspro-${pkgver}.tar.xz::${_urlbase}/AnonymousPro.tar.xz"
        "arimo-${pkgver}.tar.xz::${_urlbase}/Arimo.tar.xz"
        "aurulent-${pkgver}.tar.xz::${_urlbase}/AurulentSansMono.tar.xz"
        "bigblueterminal-${pkgver}.tar.xz::${_urlbase}/BigBlueTerminal.tar.xz"
        "bitstreamveramono-${pkgver}.tar.xz::${_urlbase}/BitstreamVeraSansMono.tar.xz"
        "cascadiacode-${pkgver}.tar.xz::${_urlbase}/CascadiaCode.tar.xz"
        "codenewroman-${pkgver}.tar.xz::${_urlbase}/CodeNewRoman.tar.xz"
        "comicshanns-${pkgver}.tar.xz::${_urlbase}/ComicShannsMono.tar.xz"
        "cousine-${pkgver}.tar.xz::${_urlbase}/Cousine.tar.xz"
        "daddytimemono-${pkgver}.tar.xz::${_urlbase}/DaddyTimeMono.tar.xz"
        "dejavu-${pkgver}.tar.xz::${_urlbase}/DejavuSansMono.tar.xz"
        "droid-${pkgver}.tar.xz::${_urlbase}/DroidSansMono.tar.xz"
        "envycoder-${pkgver}.tar.xz::${_urlbase}/EnvyCodeR.tar.xz"
        "fantasque-${pkgver}.tar.xz::${_urlbase}/FantasqueSansMono.tar.xz"
        "fira-${pkgver}.tar.xz::${_urlbase}/FiraCode.tar.xz"
        "firamono-${pkgver}.tar.xz::${_urlbase}/FiraMono.tar.xz"
        "go-${pkgver}.tar.xz::${_urlbase}/Go-Mono.tar.xz"
        "gohu-${pkgver}.tar.xz::${_urlbase}/Gohu.tar.xz"
        "hack-${pkgver}.tar.xz::${_urlbase}/Hack.tar.xz"
        "hasklig-${pkgver}.tar.xz::${_urlbase}/Hasklig.tar.xz"
        "heavydata-${pkgver}.tar.xz::${_urlbase}/HeavyData.tar.xz"
        "hermit-${pkgver}.tar.xz::${_urlbase}/Hermit.tar.xz"
        "iawriter-${pkgver}.tar.xz::${_urlbase}/iA-Writer.tar.xz"
        "ibmplexmono-${pkgver}.tar.xz::${_urlbase}/IBMPlexMono.tar.xz"
        "inconsolata-${pkgver}.tar.xz::${_urlbase}/Inconsolata.tar.xz"
        "inconsolatago-${pkgver}.tar.xz::${_urlbase}/InconsolataGo.tar.xz"
        "inconsolatalgc-${pkgver}.tar.xz::${_urlbase}/InconsolataLGC.tar.xz"
        "iosevka-${pkgver}.tar.xz::${_urlbase}/Iosevka.tar.xz"
        "iosevkaterm-${pkgver}.tar.xz::${_urlbase}/IosevkaTerm.tar.xz"
        "jetbrainsmono-${pkgver}.tar.xz::${_urlbase}/JetBrainsMono.tar.xz"
        "lekton-${pkgver}.tar.xz::${_urlbase}/Lekton.tar.xz"
        "liberationmono-${pkgver}.tar.xz::${_urlbase}/LiberationMono.tar.xz"
        "lilex-${pkgver}.tar.xz::${_urlbase}/Lilex.tar.xz"
        "meslo-${pkgver}.tar.xz::${_urlbase}/Meslo.tar.xz"
        "monofur-${pkgver}.tar.xz::${_urlbase}/Monofur.tar.xz"
        "monoid-${pkgver}.tar.xz::${_urlbase}/Monoid.tar.xz"
        "mononoki-${pkgver}.tar.xz::${_urlbase}/Mononoki.tar.xz"
        "mplus-${pkgver}.tar.xz::${_urlbase}/MPlus.tar.xz"
        "noto-${pkgver}.tar.xz::${_urlbase}/Noto.tar.xz"
        "opendyslexic-${pkgver}.tar.xz::${_urlbase}/OpenDyslexic.tar.xz"
        "overpass-${pkgver}.tar.xz::${_urlbase}/Overpass.tar.xz"
        "profont-${pkgver}.tar.xz::${_urlbase}/ProFont.tar.xz"
        "proggyclean-${pkgver}.tar.xz::${_urlbase}/ProggyClean.tar.xz"
        "robotomono-${pkgver}.tar.xz::${_urlbase}/RobotoMono.tar.xz"
        "sharetechmono-${pkgver}.tar.xz::${_urlbase}/ShareTechMono.tar.xz"
        "sourcecodepro-${pkgver}.tar.xz::${_urlbase}/SourceCodePro.tar.xz"
        "spacemono-${pkgver}.tar.xz::${_urlbase}/SpaceMono.tar.xz"
        "terminus-${pkgver}.tar.xz::${_urlbase}/Terminus.tar.xz"
        "tinos-${pkgver}.tar.xz::${_urlbase}/Tinos.tar.xz"
        "ubuntu-${pkgver}.tar.xz::${_urlbase}/Ubuntu.tar.xz"
        "ubuntumono-${pkgver}.tar.xz::${_urlbase}/UbuntuMono.tar.xz"
        "victormono-${pkgver}.tar.xz::${_urlbase}/VictorMono.tar.xz")
sha256sums=('ffe0fdceea50b94351663caf60f97f56a00c5b1b5cb2c0527be34b303acd9501'
            '7551babe12108516d26002315eb679a84f310ae845ba516a533d40559608d93e'
            'e9a644668f5878cd9b12593a5a6c0a6c1e2141c1dbb36033da4e8e212d7c1553'
            '64792fb4f3c696529ac046a3e0ddbcd40a1fd9317298062ae74dc69d6aa9671f'
            '0964e748d687e391cbdf3a3753a01a17e8bdf4063ea49d2d54ae5340d7d1b9d9'
            'e4b8b0cdb1e0d3c9b4d8572f38dd0f442bc21ac6884cab3ec5897944ce39ba56'
            '89f422c10bf0d32b255f15a6a409b932587498e8836508c4c064fbbc4c466f72'
            'd21d11c3703287663d5c5e72b3f75269fd8adc9f87f03c091b6c71805094bf2e'
            '343f8c0c5fb3dcb48b7c6e632b92908b56208955052aeac1a7f5f7cef7a6b770'
            'd5e0ea85564eafb2de8bdac78cfd00e374132b01628533de8da43e5f90f57df9'
            'c5a718d9553c57f66ce72d7b4fcadfc5f05092099ac498621c36796ee0707c2e'
            '126af0beb85661e845e89ef86bf202465685dc958353d603ec0e0e43c109b6f0'
            '2ee1ddbeeb74f11d3c448f27acd061ea80770023ec986c9089d4d76b657142c8'
            '8a5986ecc93b3835063bd05cf0e8af55e1769f50b002bb2cd70538fee8d3218f'
            'b4e3038e09aedc24080ba6200f2854a6df2fb84750128851b588143cc16203f8'
            '6e19a188dd3fe1bb1d18f361f9ae52ca9b5a875dfceeb500e6af1aadf63317cc'
            '76c1d691cea44b0cae4d6add56bb3ef52b83cedebb1c5f519b62d068f8586b93'
            '8bd1aca6c2abf629d25e1ccf34a92d2ae8d48b2ff21ace473ac7ac0c2d2b3fc6'
            'fc9e4ec15d29318b37afd67ab078d7dc1bb5b2c7371909bfce57f0195af4bd7d'
            '056292ee62fe918e45dc4125a599f4688c6371e617f7714b7b38978abdaaa42f'
            '93fb8e51f03533d271f7f5356d0438b676dbfbc1ab002af5e94b7e67e62814dd'
            '6638bfec8dc997efaa3b37a62efe13d116dc5e6cb70dca099b1577d0a4837fbb'
            '5cfebb421e7046ec704ff1b8be4ec2ffb98982fd0ed854c324d3d59672eb7f70'
            '71ce5adbf8db907d6b7a9011b53e4857ec45f1f80296d4b11bea6a1b7b70b0b2'
            '062e3c3574850098279d32b1dc36fa4ea11a843f0f3260f867f082a34ea35783'
            '903cf2418646d11e8d2eba9db230983a9e2f9e63de501296f4400c5302210a14'
            'a5bfad20f01d4f13261f3b1270e14ac53af57169679ff17bef77ad3f9ec92a0b'
            '947f029bc698cd7f73ec8ea7e2ea9d997f2329ffc5fcfafce00d6e27f690a65b'
            'eabc980d00bdc4d0e27d25b67685d429c3c744b398daeab495668eef42014203'
            '3958b94bd48e57c389d95ab27bd4a9b69164bc2466a092bc760644ac97abd9af'
            '4a1dbad752effd749753d884c74d6638c4c11cebcceda3edbe861d069493c5cc'
            '4991258b7c97071238a7459f0d3bf81a893ae7b0c849dbc47ad52833a8db7f55'
            'c614652d5891324077b4af5662c15e3d6f8afb32c01da06cb08c2b88b26cd876'
            '8c90a5b5cf03a2a180bb28b008df03d38ea148199f1bff6c4707526c0b8200d6'
            '492e31727cd293ce5b8e0c013190de7097ec1b861264bf965e36caa87af54f0c'
            'db5b328b3509707a3d4ad00bb6fc021e58c18b1a99c0ff7b973c2e324c028d2b'
            'dcfea26b9b84528d62d01b81ae5eca51ea282b18d61ca41fbfdd23fb496c89fc'
            '952602837a66d4b8dfb33c0658315e350e56e08063dc1b55329b424654abd627'
            '2e57f6d47fbdf893857e7b023252259614e4c621cd6e88cf9dbc7714347af396'
            '5a80e72816f63867d38d773d5d71b92676f48075daf4a77f143c6d12a19c434e'
            'b9f1ce9cb336e923e24fd810d926ccd691528f0106a7803740894a8e7268bf69'
            '687eea895bce8147902081f250f0772027bb439143cf29824ae847033ec2daa5'
            '44f19447908b0f65eefea9b78f70433e2ac6478c884824625a9d422d31368661'
            '4e143461dfa107299a31247e0403308384dfab1f181225d2f497e5d0ba1ae4a0'
            '7269d2c09b9432d5824ef9eff5142684df5a57fc32a496fda31141f70560899e'
            '7b8d5fd97c3388aa26a1dd3a157215115d1abd94673473a30fc566982d63e617'
            'aaa49669bbb0a855a3c56d6084ab91ae8eb598b737d7e73673b2e019ad6b4296'
            'e2ce1b45d071b2e549ce72d19a2f4e120b6b79f939fa954a40288917a3e2f863'
            '77486c89ff5ea333e5023f93f0c5b52defa6e2e0a8a5a81865d4ba31e81fda23'
            '5a1b04e93623ffe490e21ae26223ef91190b0b550b075a2c17e7e49adcea45ca'
            '72b42e74198d5f701887ef9c35159ab831d321e340ee0f6d2a95edbc891b3c71'
            '50382f10ad5574c4cdf599c4957487fd28c9f94d3db92c6baf1aafb59fe8640a'
            '771cffc071477e5bf7cef1d63df3b7a0275da1357aa99f44dade781c670d846f'
            'e07ab6c5b3fbf527581c683c481f835463233e856fd292c619c3f004d045ca00')
noextract=("${source[@]%%::*}")

prepare() {
  # make font-specific directories
  for _font in 3270 agave anonymouspro arimo aurulent bigblueterminal \
               bitstreamveramono cascadiacode codenewroman cousine \
               daddytimemono dejavu droid envycoder fantasque fira firamono go gohu \
               hack hasklig heavydata hermit iawriter ibmplexmono inconsolata \
               inconsolatago inconsolatalgc iosevka jetbrainsmono lekton \
               liberationmono lilex meslo monofur monoid mononoki mplus noto \
               opendyslexic overpass profont proggyclean robotomono \
               sharetechmono sourcecodepro spacemono terminus tinos ubuntu \
               ubuntumono victormono iosevkaterm comicshanns; do
  rm -rf ${_font}
  mkdir ${_font}
  bsdtar xf ${_font}-${pkgver}.tar.xz -C ${_font}
  done
}

package_ttf-arimo-nerd() {
  pkgdesc="Patched font Arimo from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 arimo/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 arimo/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-arimo-nerd/"
}

package_otf-aurulent-nerd() {
  pkgdesc="Patched font Aurulent Sans Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 aurulent/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 aurulent/"SIL Open Font License.txt" -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-aurulent-nerd/"
}

package_ttf-firacode-nerd() {
  pkgdesc="Patched font Fira (Fura) Code from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 fira/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 fira/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-firacode-nerd/"
}

package_otf-firamono-nerd() {
  pkgdesc="Patched font Fira (Fura) Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 firamono/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 firamono/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-firamono-nerd/"
}

package_ttf-hack-nerd() {
  pkgdesc="Patched font Hack from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 hack/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 hack/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-hack-nerd/"
}

package_ttf-iosevka-nerd() {
  pkgdesc="Patched font Iosevka from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 iosevka/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 iosevka/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-iosevka-nerd/"
}

package_ttf-iosevkaterm-nerd() {
  pkgdesc="Patched font Iosevka Term from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 iosevkaterm/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF/"
  install -Dm644 iosevkaterm/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-iosevkaterm-nerd/"
}

package_ttf-terminus-nerd() {
  pkgdesc="Patched font Terminus (Terminess) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 terminus/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 terminus/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-terminus-nerd/"
}

package_ttf-ubuntu-nerd() {
  pkgdesc="Patched font Ubuntu from nerd fonts library (mingw-w64)"
  license=('custom:Ubuntu Font License 1.0')

  install -Dm644 ubuntu/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 ubuntu/LICENCE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-ubuntu-nerd/"
}

package_ttf-ubuntu-mono-nerd() {
  pkgdesc="Patched font Ubuntu Mono from nerd fonts library (mingw-w64)"
  license=('custom:Ubuntu Font License 1.0')

  install -Dm644 ubuntumono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 ubuntumono/LICENCE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-ubuntu-mono-nerd/"
}

package_ttf-3270-nerd() {
  pkgdesc="Patched font IBM 3270 from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 3270/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 3270/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-3270-nerd/"
}

package_ttf-agave-nerd() {
  pkgdesc="Patched font Agave from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 agave/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 agave/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-agave-nerd/"
}

package_ttf-bigblueterminal-nerd() {
  pkgdesc="Patched font Big Blue Terminal from nerd fonts library (mingw-w64)"
  license=('spdx:CC-BY-SA-4.0')

  install -Dm644 bigblueterminal/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 bigblueterminal/LICENSE.TXT "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-bigblueterminal-nerd/LICENSE.txt"
}

package_ttf-anonymouspro-nerd() {
  pkgdesc="Patched font Anonymous Pro (Anonymice) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 anonymouspro/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 anonymouspro/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-anonymouspro-nerd/"
}

package_ttf-bitstream-vera-mono-nerd() {
  pkgdesc="Patched font Bitstream Vera Mono from nerd fonts library (mingw-w64)"
  license=('spdx:Bitstream-Vera')

  install -Dm644 bitstreamveramono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 bitstreamveramono/"Bitstream Vera License.txt" -t \
          "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-bitstream-vera-mono-nerd/"
}

package_ttf-cascadia-code-nerd() {
  pkgdesc="Patched font Cascadia Code (Caskaydia) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 cascadiacode/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 cascadiacode/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-cascadia-code-nerd/"
}

package_otf-codenewroman-nerd() {
  pkgdesc="Patched font Code New Roman from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 codenewroman/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 codenewroman/license.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-codenewroman-nerd/"
}

package_otf-comicshanns-nerd() {
  pkgdesc="Patched font Comic Sans (Comic Shanns) from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 comicshanns/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 comicshanns/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-comicshanns-nerd/"
}

package_ttf-cousine-nerd() {
  pkgdesc="Patched font Cousine from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 cousine/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 cousine/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-cousine-nerd/"
}

package_ttf-daddytime-mono-nerd() {
  pkgdesc="Patched font Daddy Time Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 daddytimemono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 daddytimemono/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-daddytime-mono-nerd/"
}

package_ttf-dejavu-nerd() {
  pkgdesc="Patched font Dejavu Sans Mono from nerd fonts library (mingw-w64)"
  license=('spdx:Bitstream-Vera')

  install -Dm644 dejavu/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 dejavu/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-dejavu-nerd/"
}

package_otf-droid-nerd() {
  pkgdesc="Patched font Droid Sans Mono from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 droid/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 droid/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-droid-nerd/"
}

package_ttf-envy-code-r-nerd() {
  pkgdesc="Patched font Envy Code R from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 envycoder/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 envycoder/LICENCE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-envy-code-r-nerd/"
}

package_ttf-fantasque-nerd() {
  pkgdesc="Patched font Fantasque Sans Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 fantasque/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 fantasque/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-fantasque-nerd/"
}

package_ttf-go-nerd() {
  pkgdesc="Patched font Go Mono from nerd fonts library (mingw-w64)"
  license=('custom:Go License')

  install -Dm644 go/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 go/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-go-nerd/"
}

package_ttf-gohu-nerd() {
  pkgdesc="Patched font Gohu from nerd fonts library (mingw-w64)"
  license=('spdx:WTFPL')

  install -Dm644 gohu/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 gohu/COPYING-LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-gohu-nerd/"
}

package_otf-hasklig-nerd() {
  pkgdesc="Patched font Hasklig (Hasklug) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 hasklig/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 hasklig/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-hasklig-nerd/"
}

package_ttf-heavydata-nerd() {
  pkgdesc="Patched font Heavy Data from nerd fonts library (mingw-w64)"
  license=('custom:Vic Fieger License')

  install -Dm644 heavydata/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 heavydata/"Vic Fieger License.txt" -t \
          "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-heavydata-nerd/"
}

package_otf-hermit-nerd() {
  pkgdesc="Patched font Hermit from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 hermit/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 hermit/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-hermit-nerd/"
}

package_ttf-iawriter-nerd() {
  pkgdesc="Patched font iA Writer (iM Writing) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 iawriter/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 iawriter/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-iawriter-nerd/"
}

package_ttf-ibmplex-mono-nerd() {
  pkgdesc="Patched font IBM Plex Mono (Blex) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 ibmplexmono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 ibmplexmono/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-ibmplex-mono-nerd/"
}

package_ttf-inconsolata-nerd() {
  pkgdesc="Patched font Inconsolata from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 inconsolata/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 inconsolata/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-inconsolata-nerd/"
}

package_ttf-inconsolata-go-nerd() {
  pkgdesc="Patched font Inconsolata Go from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 inconsolatago/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 inconsolatago/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-inconsolata-go-nerd/"
}

package_ttf-inconsolata-lgc-nerd() {
  pkgdesc="Patched font Inconsolata LGC from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 inconsolatalgc/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 inconsolatalgc/LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-inconsolata-lgc-nerd/LICENSE"
}

package_ttf-jetbrains-mono-nerd() {
  pkgdesc="Patched font JetBrains Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 jetbrainsmono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 jetbrainsmono/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-jetbrains-mono-nerd/"
}

package_ttf-lekton-nerd() {
  pkgdesc="Patched font Lekton from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 lekton/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 lekton/"SIL Open Font License.txt" -t \
          "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-lekton-nerd/"
}

package_ttf-liberation-mono-nerd() {
  pkgdesc="Patched font Liberation Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 liberationmono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 liberationmono/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-liberation-mono-nerd/"
}

package_ttf-lilex-nerd() {
  pkgdesc="Patched font Lilex from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 lilex/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 lilex/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-lilex-nerd/"
}

package_ttf-meslo-nerd() {
  pkgdesc="Patched font Meslo LG from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 meslo/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 meslo/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-meslo-nerd/"
}

package_ttf-monofur-nerd() {
  pkgdesc="Patched font Monofur from nerd fonts library (mingw-w64)"
  license=('custom:Monofur Free License')

  install -Dm644 monofur/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 monofur/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-monofur-nerd/"
}

package_ttf-monoid-nerd() {
  pkgdesc="Patched font Monoid from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 monoid/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 monoid/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-monoid-nerd/"
}

package_ttf-mononoki-nerd() {
  pkgdesc="Patched font Mononoki from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 mononoki/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 mononoki/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-mononoki-nerd/"
}

package_ttf-mplus-nerd() {
  pkgdesc="Patched font MPlus from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 mplus/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 mplus/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-mplus-nerd/"
}

package_ttf-noto-nerd() {
  pkgdesc="Patched font Noto from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 noto/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 noto/LICENSE_OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-noto-nerd/"
}

package_otf-opendyslexic-nerd() {
  pkgdesc="Patched font OpenDyslexic from nerd fonts library (mingw-w64)"
  license=('spdx:Bitstream-Vera')

  install -Dm644 opendyslexic/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 opendyslexic/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-opendyslexic-nerd/"
}

package_otf-overpass-nerd() {
  pkgdesc="Patched font Overpass from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 overpass/*.otf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/OTF"
  install -Dm644 overpass/LICENSE.md -t "${pkgdir}${MINGW_PREFIX}/share/licenses/otf-overpass-nerd/"
}

package_ttf-profont-nerd() {
  pkgdesc="Patched font ProFont from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 profont/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 profont/LICENSE -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-profont-nerd/"
}

package_ttf-proggyclean-nerd() {
  pkgdesc="Patched font ProggyClean from nerd fonts library (mingw-w64)"
  license=('custom')

  install -Dm644 proggyclean/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 proggyclean/Licence.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-proggyclean-nerd/"
}

package_ttf-roboto-mono-nerd() {
  pkgdesc="Patched font Roboto Mono from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 robotomono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 robotomono/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-roboto-mono-nerd/"
}

package_ttf-sharetech-mono-nerd() {
  pkgdesc="Patched font Share Tech Mono (Shure Tech Mono) from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 sharetechmono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 sharetechmono/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-sharetech-mono-nerd/"
}

package_ttf-sourcecodepro-nerd() {
  pkgdesc="Patched font Source Code Pro from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 sourcecodepro/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 sourcecodepro/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-sourcecodepro-nerd/"
}

package_ttf-space-mono-nerd() {
  pkgdesc="Patched font Space Mono from nerd fonts library (mingw-w64)"
  license=('spdx:OFL-1.1')

  install -Dm644 spacemono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 spacemono/OFL.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-space-mono-nerd/"
}

package_ttf-tinos-nerd() {
  pkgdesc="Patched font Tinos from nerd fonts library (mingw-w64)"
  license=('spdx:Apache-2.0')

  install -Dm644 tinos/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 tinos/"Apache License.txt" -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-tinos-nerd/"
}

package_ttf-victor-mono-nerd() {
  pkgdesc="Patched font Victor Mono from nerd fonts library (mingw-w64)"
  license=('spdx:MIT')

  install -Dm644 victormono/*.ttf -t "${pkgdir}${MINGW_PREFIX}/share/fonts/TTF"
  install -Dm644 victormono/LICENSE.txt -t "${pkgdir}${MINGW_PREFIX}/share/licenses/ttf-victor-mono-nerd/"
}

# template start; name=mingw-w64-splitpkg-wrappers; version=1.0; 
 # vim: set ft=bash : 
  
 # generate wrappers 
 for _name in "${pkgname[@]}"; do 
   _short="package_${_name#${MINGW_PACKAGE_PREFIX}-}" 
   _func="$(declare -f "${_short}")" 
   eval "${_func/#${_short}/package_${_name}}" 
 done 
 # template end;
